#ifndef ENVIRONMENTSPHERE_H
#define ENVIRONMENTSPHERE_H

#include <string>
#include <vector>
#include <stdio.h>
#include <math.h>
#include <windows.h>
#include <iostream>
#include <SDL.h>
#include <GL/glew.h>
#include <GL/GL.h>
#include <GL/glu.h>
#include <math.h>

#include "configFileData.h"
#include "vector3.h"
#include "vector2.h"
#include "Utility.h"

typedef vector3f vec3;
typedef vector2f vec2;

using namespace std;

class EnvironmentSphere
{
public:
	EnvironmentSphere(void);
	EnvironmentSphere(vec2 pCenter, float pRadius, int pNu, int pNv,  string pEnvTexImagePath, GLuint pTexId );
	~EnvironmentSphere(void);
	
	void drawEnvSphere();
	void setTextureId(GLuint pTextureId);
	GLuint getTextureId();

private:
	vec2 mSphereCenter;
	float mSphereRadius;

	int mNu;
	int mNv;

	string mEnvTextureImage;
	
	GLuint mTextureId;

	SDL_Surface* mSurface;
private:
	int mId;
	void parametricEval(float u, float v, int offsetP, int offsetN, float* vertices, float* normals);
	void setTextureParameters(string pTextImagePath);

};
#endif